home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20041116-20060924
/
000111_fdc@columbia.edu_Fri Jun 3 17:34:59 2005.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Path: newsmaster.cc.columbia.edu!not-for-mail
From: Frank da Cruz <fdc@columbia.edu>
Newsgroups: comp.protocols.kermit.misc
Subject: Re: convert lf -> lf/cr
Date: 3 Jun 2005 21:34:48 GMT
Organization: Columbia University
Lines: 55
Message-ID: <slrnda1j7o.2nu.fdc@sesame.cc.columbia.edu>
References: <1117818075.712279.116900@o13g2000cwo.googlegroups.com>
Reply-To: fdc@columbia.edu
NNTP-Posting-Host: sesame.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1117834488 18120 128.59.59.56 (3 Jun 2005 21:34:48 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 3 Jun 2005 21:34:48 GMT
User-Agent: slrn/0.9.8.0 (SunOS)
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15350
On 2005-06-03, hkdevel@gmail.com <hkdevel@gmail.com> wrote:
: I'm runnig c-kermit 8.0.209 on linux box. I'm connectin to a embedded
: system via serial line with following options set in my config:
:
: set line /dev/ttyUSB0
: set speed 115200
: set carrier-watch off
: set handshake none
: set flow-control none
: robust
: set file type bin
: set file name lit
: set rec pack 1000
: set send pack 1000
: set window 5
: log SESSION /tmp/kermlog-axissaxis
:
: The problem is that remote device sends only lf at the end of the
: string and output in kermit is always indented since cr if missing.
:
: Is there a way to translate lf to lf/cr automaticly?
:
I could have sworn there was but I can't find it in the commands or in
the code. There is a command:
set terminal cr-display { cr, crlf }
to handle bare incoming carriage returns, but none for bare incoming
linefeeds. Then looking through my notes, I realize I meant to add it quite
some time ago, when the same thing happened to me when I was typing directly
at a PostScript interpreter. So OK, I moved this item up towards the top of
the list.
In the meantime, if you're a C programmer, the modification to ckucns.c
should be pretty straightforward, it would be right here, about line 2246:
if (c == CR && tt_crd) { /* SET TERM CR-DISPLA CRLF? */
ckcputc(c); /* Yes, output CR */
if (seslog && !sessft) logchar((char)c);
c = LF; /* and insert a linefeed */
}
Just stuff a CR before passing on the LF:
if (c == LF && tt_crd) { /* SET TERM CR-DISPLA CRLF? */
ckcputc(CR); /* Yes, output CR first */
if (seslog && !sessft) logchar((char)CR);
}
bearing in mind that then you will have a hacked version in which SET TERM
CR-DISPLAY really means SET TERM LF-DISPLAY. When the next release (or daily
edit) appears, it will have the new command and you can throw your version out
and use the new one.
- Frank